/*
 * @Author: wenqingwu 18417432@qq.com
 * @Date: 2023-07-11 14:13:59
 * @LastEditors: wenqingwu 18417432@qq.com
 * @LastEditTime: 2023-07-11 14:42:51
 * @FilePath: \w325coding-react\day104\router-v5\src\router\rednerRoutes.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { Redirect } from "react-router-dom"
import LoginView from './../login/LoginView'
import HomeView from './../home/HomeView';
import QxView from './../permission/QxView';
import YhView from './../users/YhView';
const routes = [
  //根路由
  { path: "/", exact: true, render: () => <Redirect to="/login" /> },
  // 1级路由
  { path: "/login", component: LoginView },
  {
    path: "/home", component: HomeView,
    auth: true, // 验证路由的属性变量
    //1级的 子路由的配置：
    routes: [
      // 默认子路由
      { path: "/home", exact: true, render: () => <Redirect to="/home/qx" /> },
      { path: "/home/qx", component: QxView },
      { path: "/home/yh", component: YhView },
    ]
  }

];
export default routes;